#include "prefixTree.hpp"
#include "tools.hpp"
#include <cstdio>

int main()
{
    auto& ansi = lxj::OpenANSI::instance();
    ansi.set_mode(1).set_color(76);
    lxj::Time time;
    auto&     random = lxj::Random<int>::instance();

    std::string text1 =
        "Beijing, the capital of China, blends ancient charm with modern grandeur. The Forbidden "
        "City stands as a magnificent symbol of imperial history, while the Great Wall winds "
        "across mountain ridges nearby. Temple of Heaven and Summer Palace showcase exquisite "
        "traditional architecture amid serene gardens. Modern landmarks like the CCTV Tower and "
        "Olympic Park highlight Beijing’s rapid development. In spring, blossoms cover parks; in "
        "autumn, ginkgo trees turn golden. With its rich culture, historic sites, and vibrant city "
        "life, Beijing offers a captivating journey through time and tradition.";
    for (auto& c : text1) {
        if (c >= 'A' && c <= 'Z') c = 'a' + (c - 'A');
    }

    std::string text2 = "ab abc ab";
    {
        lxj::Time   t;
        trie2::Trie tree(text1);
        std::printf("%d\n", tree.prefix("w"));
    }

    std::puts("");
    return 0;
}